package com.buaa.divinationmaster.database;

import androidx.room.TypeConverter;

/**
 * Room数据库类型转换器
 */
public class Converters {
    
    @TypeConverter
    public static String fromBoolean(Boolean value) {
        return value == null ? null : (value ? "1" : "0");
    }
    
    @TypeConverter
    public static Boolean toBoolean(String value) {
        return value == null ? null : "1".equals(value);
    }
}
